package com.nenude.corejava.ch9;

import java.util.Scanner;

public class TestPhoneNumber {

	public static void main(String[] args) {
		//输入一个手机号码，将中间四位使用星号替代。
		
		System.out.println("输入一串手机号码：");
		Scanner scanner=new Scanner(System.in);
		String str=scanner.nextLine();
		StringBuffer buffer=new StringBuffer(str);		
		buffer.replace(3, 7, "****");	
		System.out.println(buffer.toString());		
	}

}
